import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
//=============================================
import department from "./views/org/Department.vue"
import employee from "./views/org/Employee.vue"
import type from "./views/system/Systemdictionarytype.vue"
import weblog from "./views/system/WebLog.vue"
import shop from "./views/org/Shop.vue"
import ShopRegister from "./views/ShopRegister.vue"
import SearchMasterMsgPending from "./views/pet/SearchMasterMsgPending.vue"
import SearchMasterMsgProcessed from "./views/pet/SearchMasterMsgProcessed.vue"
import Pet from "./views/pet/Pet.vue"
import Product from "./views/product/Product.vue"
import AdoptOrder from "./views/order/AdoptOrder.vue"
import ProductOrder from "./views/order/ProductOrder.vue"

//

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf : true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/dept', component: department, name: '部门列表' },
            { path: '/emp', component: employee, name: '员工列表' },
            { path: '/shop', component: shop, name: '店铺列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/type', component: type, name: '数据字典'},
            { path: '/weblog', component: weblog, name: '日志管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '宠物管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/pending', component: SearchMasterMsgPending, name: '待处理寻主消息'},
            { path: '/processed', component: SearchMasterMsgProcessed, name: '已处理寻主消息'},
            { path: '/pet', component: Pet, name: '宠物列表'},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '服务管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/product', component: Product, name: '服务列表'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/adopt', component: AdoptOrder, name: '领养订单' },
            { path: '/recharge', component: AdoptOrder, name: '充值订单' },
            { path: '/productOrder', component: ProductOrder, name: '服务订单' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;